.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .content {
    visibility: hidden;
    opacity: 0;
    max-width: 16rem;
    min-width: 6rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.5rem;
    border-radius: 6px;
    overflow-wrap: break-word;
    text-align: center;
    transition: opacity 100ms;

    position: absolute;
    z-index: 1;
    top: -1rem;
}

.tooltip.below .content {
    top: calc(100% + 0.125rem);
    left: 50%;
    right: 0;
    transform: translateX(-50%);
}

.tooltip.above .content {
    top: unset;
    bottom: calc(100% + 0.125rem);
    left: 50%;
    right: 0;
    transform: translateX(-50%);
}

.tooltip.darker .content {
    background-color: rgba(0, 0, 0, 0.8);
}

.tooltip.right .content {
    left: 120%;
}

.tooltip.right:dir(rtl):not(.force-ltr) .content {
    right: 120%;
    left: unset;
}

.tooltip.left .content {
    right: 120%;
}

.tooltip.left:dir(rtl):not(.force-ltr) .content {
    left: 120%;
    right: unset;
}

.tooltip .content.sm {
    font-size: 0.8rem;
}

.tooltip:hover .content,
.tooltip:focus .content,
.tooltip:focus-within .content
{
    visibility: visible;
    opacity: 1;
}
